//
// Created by martin on 9/27/21.
//

#include <stdlib.h>
#include <string.h>
#include "datachannel.h"

DataChannel* datachannel_new()
{
    DataChannel *channel = (DataChannel *) malloc(sizeof(DataChannel));
    if (!channel) {
        return NULL;
    }

    bzero(channel, sizeof(DataChannel));
    return channel;
}

void datachannel_free(DataChannel **channel)
{
    if (!channel || !(*channel)) return;

    free(*channel);
    *channel = NULL;
}